﻿<phone:PhoneApplicationPage 
    x:Class="GrimorioApplication.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True">

    <!--LayoutRoot is the root grid where all page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock x:Name="ApplicationTitle" Text="GRIMORIO" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="Home" Text="Home" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="0.5*"/>
                <ColumnDefinition Width="0.5*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
                <RowDefinition Height="*"/>
            </Grid.RowDefinitions>
            <Button x:Name="btn_recipes" 
                    Grid.Row="0" Grid.Column="0" 
                    Grid.ColumnSpan="2" 
                    Background="{StaticResource PhoneAccentBrush}" 
                    BorderThickness="0" 
                    Click="btn_recipes_Click"
                    MouseEnter="btn_recipes_Pressed"
                    MouseLeave="btn_recipes_Leaves">
                <StackPanel>
                    <Image x:Name="RecipeImage" Source="/Img/AppIcons/recipe_100_100.png" Stretch="Fill" Height="130" Width="130"/>
                    <TextBlock HorizontalAlignment="Center" Text="{Binding LocalizedResources.btn_recipes, Source={StaticResource LocalizedStrings}}"/>
                </StackPanel>
            </Button>
            <Button x:Name="btn_help" 
                    Grid.Row="1" Grid.Column="0" 
                    Background="{StaticResource PhoneAccentBrush}" 
                    BorderThickness="0" 
                    Click="btn_help_Click"
                    MouseEnter="btn_help_Pressed"
                    MouseLeave="btn_help_Leaves"
                    VerticalContentAlignment="Bottom">
                <StackPanel>
                    <Image x:Name="HelpImage" Source="/Img/AppIcons/aboutHelp_100_100.png" Stretch="Fill" Height="100" Width="100"/>
                    <TextBlock HorizontalAlignment="Center" Margin="10" Text="{Binding LocalizedResources.btn_help, Source={StaticResource LocalizedStrings}}"/>
                </StackPanel>
            </Button>
            <Button x:Name="btn_search" 
                    Grid.Row="1" Grid.Column="1" 
                    Background="{StaticResource PhoneAccentBrush}" 
                    BorderThickness="0" 
                    Click="btn_search_Click"
                    MouseEnter="btn_search_Pressed"
                    MouseLeave="btn_search_Leaves"
                    VerticalContentAlignment="Bottom">
                <StackPanel>
                    <Image x:Name="SearchImage" Source="/Img/AppIcons/search_100_100.png" Stretch="Fill" Height="100" Width="100"/>
                    <TextBlock HorizontalAlignment="Center" Margin="10" Text="{Binding LocalizedResources.btn_search, Source={StaticResource LocalizedStrings}}"/>
                </StackPanel>
            </Button>
            <Button x:Name="btn_newrecipe" 
                    Grid.Row="2" Grid.Column="0" 
                    Grid.ColumnSpan="2" 
                    Background="{StaticResource PhoneAccentBrush}" 
                    BorderThickness="0" 
                    Click="btn_newrecipe_Click"
                    MouseEnter="btn_newrecipe_Pressed"
                    MouseLeave="btn_newrecipe_Leaves"
                    VerticalContentAlignment="Bottom">
                <StackPanel>
                    <Image x:Name="AddImage" Source="/Img/AppIcons/add_100_100.png" Stretch="Fill" Height="100" Width="100"/>
                    <TextBlock HorizontalAlignment="Center" Margin="10" Text="{Binding LocalizedResources.btn_newrecipe, Source={StaticResource LocalizedStrings}}"/>
                </StackPanel>
            </Button>
        </Grid>
    </Grid>
 
</phone:PhoneApplicationPage>